package com.red.controller;

import com.red.pojo.Result;
import com.red.pojo.model.RegisterBody;
import com.red.service.IRegisterService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RegisterController {

    @Autowired
    private IRegisterService registerService;

    @PostMapping("/register")
    public Result register(@RequestBody RegisterBody registerBody) {
        return registerService.register(registerBody);
    }

}
